home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Physics / Laser / Laser.app / Laser.nib (.txt) < prev    next >
Encoding:
NeXT TypedStream Data  |  1992-07-27  |  46.4 KB  |  734 lines

  1. typedstream
  2. StreamTable
  3.     HashTable
  4. Object
  5. [20c]
  6. typedstream
  7. [4866c]
  8. typedstream
  9.     HashTable
  10. Object
  11. LaserController
  12. HeaderClass
  13. %%%%i@@
  14. genericobject_nib
  15. rateTypeSelector
  16. scaleN1Field
  17. scaleTimeField
  18. theN1N2View
  19. timeStepField
  20. timeEndField
  21. photonField
  22. theComYMenu
  23. timeStartField
  24. relTolField
  25. theComXMenu
  26. scaleRField
  27. absTolField
  28. theRText
  29. actualT2Field
  30. savePrefSW
  31. scaleWField
  32. actualT0Field
  33. comTitle
  34. alertSuspectSW
  35. theComScaleSw
  36. actualTimeField
  37. composeButton
  38. actualN2Field
  39. actualT1Field
  40. animator
  41. wLowerField
  42. wInitField
  43. startButton
  44. theAASlider
  45. theLaser
  46. actualWField
  47. theT1Slider
  48. theT0Slider
  49. actualN1Field
  50. alertChoices
  51. timeStepSlider
  52.     theEnDiag
  53. absTolSlider
  54. actualRField
  55. theWView
  56. wUpperField
  57. theEnDiagView
  58. n2UpperField
  59. theWScaleSw
  60. n2InitField
  61. n1UpperField
  62. integrationChoices
  63. n1InitField
  64. scaleT2Field
  65. theRSlider
  66. clearDisplayAfterPassSW
  67. scaleT0Field
  68. relTolSlider
  69. loadEnSW
  70. initValsForNewPassSW
  71.     theT1Text
  72. n2LowerField
  73. theN1N2ScaleSw
  74. scaleT1Field
  75. thePicView
  76.     theT0Text
  77. n1LowerField
  78. loadNotesSW
  79.     theAAText
  80. hideAllViewsSW
  81. theComView
  82. scaleN2Field
  83. integrationDefaults:
  84. relTolHasChanged:
  85. runSolveRK:
  86. timeStepHasChanged:
  87. initParDefaults:
  88. showLaser:
  89. changeRRateControls:
  90. startStopModel:
  91. updateDataInfo:
  92. paramWindow:
  93. startTimeHasChanged:
  94. changeAnimationSpeed:
  95. absTolHasChanged:
  96. integrationMethodHasChanged:
  97. printKeyWindow:
  98. setComViewLabels:
  99. resetModel:
  100. stopTimeHasChanged:
  101.     colorOff:
  102. hideLaser:
  103. displayEnergyDiags:
  104.     resetAll:
  105. timeDefaults:
  106. setDefaultRates:
  107. changeRRate:
  108. setDefaultPrefs:
  109. colorOn:
  110. changeAARate:
  111. appDidInit:
  112. changeT0Rate:
  113. resetTime:
  114. changeT1Rate:
  115. Animator
  116. /usr/include/sys/message.h
  117. target
  118. ParamWindow
  119. Window
  120.     windownib
  121. field1
  122. field2Slider
  123. field2Title
  124. field3Slider
  125. field3Title
  126. field4
  127. field1Slider
  128. field1Title
  129.     modeTitle
  130. field2
  131. theFuncView
  132. field4Title
  133. field3
  134. field4Slider
  135. changeFieldVals:
  136.     GraphView
  137. /usr/include/math.h
  138. viewnib
  139. xAutoSW
  140. strokeDecreaseButton
  141. crossCursor
  142. yAutoSW
  143. sortedHistPoints
  144. readOut
  145. cBinEdgeField
  146. maxStrokeRatioField
  147. oldEdgeField
  148.     yMinField
  149.     xMinField
  150. yTickStartField
  151. thePasteBoard
  152. zoomList
  153. newEdgeField
  154. xTickStartField
  155. binWidthField
  156. yPlotModeSelector
  157. xPlotModeSelector
  158. dataPoints
  159. snapShot
  160. pointRadiusField
  161. delegate
  162. unZoomCursor
  163. strokeIncreaseButton
  164. rawHistPoints
  165. strokeWidthField
  166. histogramInspector
  167. lineThicknessField
  168. xMajTickWidthField
  169. yMajTickWidthField
  170.     yMaxField
  171. nibDecreaseButton
  172. controlPanel
  173.     xMaxField
  174. nibIncreaseButton
  175. binOffsetField
  176. selectHistogramOrientation:
  177. enableDrawing:
  178. receiveNumMinorTicksFrom:
  179. toggleLabels:
  180. copyAsciiDataToPboard:
  181. receiveBinOffsetFrom:
  182. disableDrawing:
  183. toggleColor:
  184. toggleDrawingState:
  185. relocateEdge:
  186. changeGlobalPenSize:
  187. toggleYAxis:
  188. windowWillClose:
  189. toggleXAutoscale:
  190.     rescaleX:
  191.     rescaleY:
  192. toggleGrid:
  193. windowDidResignKey:
  194. syncAxesToTicks:
  195. toggleMinorTicks:
  196. selectYPlotModeFrom:
  197. toggleXAxis:
  198. receiveXTickStartFrom:
  199. receiveYTickStartFrom:
  200. setAxesToOrigin:
  201. toggleMajorTicks:
  202. receiveXMajorTickWidthFrom:
  203. receiveYMajorTickWidthFrom:
  204. selectXPlotModeFrom:
  205. pasteArchiveDataFromPboard:
  206. receiveXMaxFrom:
  207. receiveYMaxFrom:
  208. receiveXMinFrom:
  209. receiveMaxStrokeRatioFrom:
  210. receiveYMinFrom:
  211. receiveBinWidthFrom:
  212. copyPSDataToPboard:
  213. expandToNewWindow:
  214. copyArchiveDataToPboard:
  215. !changeGlobalHistogramStrokeWidth:
  216. receiveCurrentBinEdgeFrom:
  217. toggleYAutoscale:
  218. clearDataInfo:
  219. PictureScroller
  220. ScrollView
  221.     scrollnib
  222.     LaserView
  223. legendText
  224. stimStates
  225. spontStates
  226. maxUpperNumText
  227. upperStates
  228. maxNumIsChanging:
  229. FirstResponder
  230. firstnib
  231. checkSpelling:
  232. alignSelCenter:
  233.     unscript:
  234. pasteFont:
  235. runPageLayout:
  236. superscript:
  237. copyRuler:
  238.     copyFont:
  239. selectAll:
  240. pasteRuler:
  241. toggleRuler:
  242. showGuessPanel:
  243. alignSelLeft:
  244. paste:
  245. performClose:
  246. arrangeInFront:
  247. subscript:
  248. copy:
  249. alignSelRight:
  250. delete:
  251. orderFrontColorPanel:
  252. underline:
  253. performMiniaturize:
  254. [42545c]
  255. typedstream
  256.     HashTable
  257. Object
  258. NibData
  259. @@@@s
  260. Storage
  261. {*@@}
  262. [344{*@@}]
  263. File's Owner
  264. CustomObject
  265. Application
  266. MainMenu
  267. MenuTemplate
  268. *@*@ccc
  269. Laser
  270. Matrix
  271. Control
  272.     Responder
  273. @:@iiii
  274. MenuCell
  275. ButtonCell
  276. ActionCell
  277.     Helvetica
  278. Info Panel
  279. Diagrams
  280. Theory
  281.     LaserView
  282. ff@@#::s
  283. submenuAction:
  284. Bitmap
  285.     menuArrow
  286. Windows
  287. Main Window
  288. Data Panel
  289. Preferences
  290. Print
  291. MyWindow
  292. WindowTemplate
  293. iiii***@s@
  294. 4 Stage Laser
  295. Window
  296. [42@]
  297. Button
  298. SliderCell
  299. TextFieldCell
  300. Times-Bold
  301. Title!
  302.     TextField
  303. Rate Constants
  304. 5.0e-8
  305. Defaults
  306. Manual!
  307. OtherViews
  308. Gaussian!
  309. Square!
  310. Switch!
  311. Sawtooth!
  312.     PopUpListV
  313. popUp:
  314. popup
  315. popupH
  316. y Axis
  317. Helvetica-Bold
  318. Energyw
  319. x Axisw
  320. Timew
  321. CustomView
  322.     GraphView
  323. Reset All & Clear!
  324. Sound
  325. Reset Parameters!
  326. Reset Time!
  327. Pause
  328. NXImage
  329. LaserOff
  330. LaserOn
  331.     Pump Rate!
  332. (Double Click on any graph for inspector.
  333. View1
  334. Box15
  335. Button13
  336. Matrix6
  337. Slider2
  338. Slider
  339. Slider1
  340. Slider3
  341. Matrix7
  342. Field1
  343. Field
  344. Field2
  345. Field3
  346. Matrix8
  347. Box20
  348. Field41
  349. Field54
  350. Field67
  351. Field7:
  352. Field8=
  353. Field9@
  354. Field10C
  355. Field11F
  356. Box27I
  357. Box29Q
  358. rControlV
  359. Box5l
  360. Button1q
  361. Box7y
  362. Button11~
  363. Field12
  364. Box14
  365. Button14
  366. Button21
  367. Box23
  368. Start
  369. Field13
  370. LaserControllerInstance
  371. LaserController
  372. ParamWindow1
  373. Pump Rate Function
  374. ParamWindow
  375. [23@]
  376. Field1 Title
  377. Field2 Title
  378. Field3 Title
  379. Field4 Title
  380. Matrix1
  381. Diagram
  382. !Energy Level Diagrams & Equations
  383. PictureScroller
  384. [52@]
  385. Display!
  386. Clear display after each pass
  387. NXswitch
  388.     NXswitchH
  389. Hide all views at startup
  390. Load Energy diagrams
  391. Load Notes
  392.     Numerical
  393. General
  394. Alert on Suspicious Values
  395. Save Preferences on exit
  396. Alert on overflows/underflows
  397. NXradio
  398. NXradioH
  399. Autocap overflows/underflows
  400. Reset overflows/underflows
  401. Ignore
  402. Radio
  403. Numerical Bounds
  404. Lower!
  405. Upper!
  406. Multiple Runs
  407. Initialize values for each pass
  408. Integration Method
  409. Runge-Kutta 4
  410. Runge-Kutta-Fehlberg 4/5
  411. Simulation Speed
  412. Faster!
  413. Slower!
  414. Matrix2
  415. Matrix3
  416. Matrix4
  417. Matrix5
  418. Field14
  419. Field15
  420. Field16
  421. Field17
  422. Matrix9
  423. Field18
  424. Field19
  425. Field20
  426. Matrix10
  427. Field21
  428. Field22
  429. Field23
  430. Panel
  431. Data Information
  432. [99@]
  433. Initial Values
  434. Time Values
  435. Update to Current Values
  436. Default
  437. Scaled Values of Parameters
  438. time!
  439. Actual Values of Parameters
  440. T2(=1/A21)!
  441. Lifetime of State 2 (sec)
  442. Integration Parameters
  443.     Time Step!
  444. Tolerance (abs.)!
  445. 1.0e-5
  446. Tolerance (rel.)!
  447. 1.0e-9
  448. Symbol
  449. Photon wavelength (m)
  450. Matrix11
  451. Matrix12
  452. Matrix13
  453. Field25
  454. Matrix14
  455. Field27
  456. Matrix15
  457. Field29
  458. Field31
  459. Matrix16
  460. Field32
  461. Field33
  462. Matrix17
  463. Field34
  464. Field35
  465. Matrix18
  466. Field36
  467. Field37
  468. Matrix19
  469. Field38
  470. Field39
  471. Matrix20
  472. Field40
  473. Field41
  474. Matrix21
  475. Field42
  476. Field43
  477. Matrix22
  478. Field44
  479. Field45
  480. Matrix23
  481. Field46
  482. Field47
  483. Field24
  484. Field26
  485. Field28
  486. Field30
  487. Field48
  488. Matrix24
  489. Field49
  490. Field50
  491. Matrix25
  492. Field51
  493. Field52
  494. Matrix26
  495. Field53
  496. Field54
  497. Matrix27
  498. Button2
  499. Matrix28
  500. LaserWindow
  501. Laser View
  502. [10@]
  503. Hide Laser!
  504. Max number!
  505. ?Yellow:Excited    Green:Spontaneous Decay        Red:Stimulated Decay
  506. [17@]
  507. 'Rate Equation Model for a 4-Stage Laser
  508. References
  509. Version 1.00
  510. Authors!
  511. `Ashoke S. Talukdar
  512. Wolfgang Christian
  513. Physics Department
  514. Davidson College, Davidson, NC 28036.
  515. E-Mail Addresses!
  516. 3ashoke@phyhost.davidson.edu
  517. wc@phyhost.davidson.edu
  518.     NeXT Mail
  519. Generic
  520. >astalukdar@apollo.davidson.edu
  521. wochristian@apollo.davidson.edu
  522. VersionNumber
  523. Button3
  524. ScrollView
  525. ClipView
  526. ciifffcfffs
  527. [995c]{\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fswiss Helvetica;}
  528. \margl40
  529. \margr40
  530. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ul0\fs28 Andrews D. G.H.  &  Tilley D.R.   
  531. \b A computer model of\
  532.     laser action in the teaching of computational\
  533.     physics
  534. \b0 .   American Journal of Physics, 
  535. \b 59
  536. \b0 (6), June\
  537.     1991.\
  538. Dohner H. J. & Elsasser  W.  
  539. \b Analysis of a 4-Level Laser\
  540.     System : Investigations of the output power\
  541.     characteristics of a He-Ne Laser
  542. \b0 ,  American\
  543.     Journal of  Physics, 
  544. \b 59
  545. \b0 (4), April, 1991,  American\
  546.     Association of Physics Teachers, 1991.\
  547. Eberly J. & Milloni P.   
  548. \b Lasers
  549. \b0 ,  John Wiley & Sons, 1988.\
  550. Flannery B. P.,  Press W. H., Teukolsky S.A. & Vetterling W.     T.   
  551. \b Numerical Recipes in C : The Art of\
  552.     Scientific Computing
  553. \b0 , Cambridge University Press,\
  554.     1988.\
  555. Wolfram S.   
  556. \b\i Mathematica
  557. \i0 , A System for Doing\
  558.     Mathematics by Computer
  559. \b0 , Addison Wesley\
  560.     Publishing Company, 1991.
  561. NXCursor
  562. NXibeam
  563. Scroller
  564. _doScroller:
  565. @@@ffs
  566. ScrollingText
  567. [6715c]{\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fswiss Helvetica;}
  568. \margl40
  569. \margr40
  570. {\colortbl\red0\green0\blue0;}
  571. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\f0\b\i0\ul0\fs32\fc0 The Rate-Equation Model
  572. \b0\fs28 \
  573.     One of the simplest descriptions of laser actions is the rate equation model.  In this model we look at the rates of change of the number of atoms in the various states as well as the total energy in the cavity, as multivariable functions that depend not only on time but also on the actual values of these variables at any given time.  In other words we use a system of coupled differential equations.\
  574.     Although a typical laser is a multi-level system, most lasers can be broadly classified into three or four level systems.  For our studies we have considered a somewhat idealized four level laser as shown in Fig. 1a.  The common Nd3+-glass and CO2 lasers are examples of 4-level lasers.  The dynamics of the model are as follows.\
  575.     Atoms in the ground state (an infinite ground state is assumed) are pumped up into level 3 at a rate R.  In the laboratory this can be done in several ways - electric discharges, strong light sources or even a pulse from an external laser.  Level 3 typically represents  a state that has a very short lifetime, so that the atoms decay rapidly and non-radiatively to level 2.  The latter, sometimes know as a meta-stable state has a measurable life-time that is significantly larger than that of level 3.  Level one also represents a state with a short life time.  \
  576.     The net effect is that for appropriate values of R, there is a gradual build up of atoms in level 2 whereas any atom in level one quickly decays to the ground state thereby causing a population inversion between levels 1 and 2.  This gives the necessary condition for lasing.  The emitted light from this transition is confined in the laser cavity and amplified  A fraction of this light is allowed to escape out of the cavity through the partially transmitting mirror M2. This forms an intense laser beam.\
  577.     For details about the transformation of the variables to dimensionless form, please see, 
  578. \b Andrews & Tilley 
  579. \b0 (cf. Info Panel->Reference Panel)\
  580. \b\fs32 Computer Experiments
  581. \b0\fs28 \
  582. \b Testing the code
  583. \b0 \
  584.     As mentioned before the differential equations shown in Eqs. 4 through 6 are coupled and do not have solutions in closed form.  The natural choice for an method to solve these equations in numerical form was an order 4 Runge-Kutta alogorithm.  The first step in the experiments was to test the code.  For this purpose, we used the values suggested used in the original experment as described by Andrews and Tilly in their paper.\
  585.             t1  =  T1/T2  =  0.5\
  586.             t2  =  1\
  587.             t0  =  T0/T2  =  10\
  588.     Using these values we ran our program through three passes, each time starting at t=0 and going upto t=200.  The scaled pumping rate for each run was r=0.5, r.1.5 and r=4 respectively.  The initial values of n1, n2 and w were set at 0.  The results are shown in Plate 1.1a-c.\
  589.     When the pump rate is half of the threshold value, there is virtually no lasing, and the energy in the cavity is almost entirely due to spontaneous emission and hence, rises to a very low value.  But when the rate is greater than the threshold value lasing takes place.  The lasing state is reached in two steps.  First, the non-lasing solution given by eq. 8a is reached.  But this is unstable and eventually the system switches to the stable, lasing soultion.  N1, being independent of W, remains more or less constant during this process, and N2, switches from its higher, unstable value to the lower value as W becomes positive.\
  590.     It should be noted that there is a big difference in the numerical time scales of the number densities and the energy.  It is here that the smallness of the value of A21'/A21 comes into play.  As mentioned before this value represents the spontaneous decay into the lasing mode.  The physical representation of this value is the noise that is subsequently amplified to switch the system into lasing state.  If this value is ignored, the spontaneous part of eq. 18 disappears, i.e. there is no initial noise, and the model never switches to the lasing state!\
  591. \b Q Switching
  592. \b0 \
  593.     One of the common ways of obtaining short pulses is Q switching.  In this method, laser oscillations are prevented in the cavity by reducing the Q of the cavity while pumping energy in.  This results in a high degree of population inversion.  Then the Q is switched to a high value so that the energy in the cavity builds up rapidly, converting the energy of the upper state atoms as they decay, into a short pulse of laser light.  In the model used here, this can be achieved by setting the initial values of n1 and n2 so that (n2 - n1) is high.  The following starting values may be used.\
  594.     n1[0]=0;\
  595.     n2[0]=5;\
  596.     w[0]=0;\
  597.     r=0;\
  598.     0<=t<=0.1 in steps of 0.001\
  599.     t0=0.1\
  600.     t1=0.5\
  601.     A'=10^-3\
  602. \b Relaxation Oscillation
  603. \b0 \
  604.     Another interesting aspect of pulsed lasers is relaxation oscillation.  Here the laser energy is allowed to build up so rapidly that the population inversion is depleted.  However, because of the coupled nature of Eqs 1 though 3, with respect to (N2-N1), this diminishes the lasing so that the energy falls and the population inversion builds up again and the process is repeated.  This produces short oscillating pulses of energy.  This can be achieved by using a relatively high pump rate (i.e. well above threshold).  The results from several runs are shown in Plates 1.3a...\
  605.     As can be seen from these plates, the pulses usually have decreasing amplitudes which finally produce the steady lasing state.  However, for appropriate values of T0 and R, it is possible to force the system into a limit cycle where the pump rate is sufficiently high to bring the depleted population inversion back to the same value as before and then the process repeats.   Typical experimental parameters are:\
  606.     n1[0]=0;\
  607.     n2[0]=0;\
  608.     w[0]=0;\
  609.     r=10;\
  610.     0<=t<=0.1 in steps of 0.001\
  611.     t0=0.0005\
  612.     t1=0.9\
  613.     A'=10^-5\
  614. \b Mode Locking
  615. \b0 \
  616.     When a pumping rate with a period comparable to the period of oscillation of the cavity relaxation is applied, the relaxations are prevented because the upper state is replenished at the same time as the lasing starts.  This gives very sharp pulses of enegy with widths that are comparable to the width of the pump profile (usually a Gaussian).  This is called mode locking.   This can be produced by the same values as above, but with a periodic Gaussian pulse rate for r.\
  617.     The description of the pulse is:\
  618.     Amplitude=120\
  619.     Period=0.024\
  620.     Center=0.012\
  621.     Width=0.001\
  622. Show Energy Level Diagram!
  623. {i*@@@}
  624. [146{i*@@@}]
  625. hide:
  626. terminate:
  627. theWView
  628. theAASlider
  629. theRSlider
  630. theT1Slider
  631. theT0Slider
  632.     theT0Text
  633.     theT1Text
  634. theRText
  635.     theAAText
  636. changeT0Rate:
  637. changeT1Rate:
  638. changeRRate:
  639. changeAARate:
  640. delegate
  641. setDefaultRates:N
  642. resetModel:
  643. changeRRateControls:]
  644.     modeTitle
  645. field1
  646. field1Slider
  647. field1Title
  648. field2
  649. field2Slider
  650. field2Title
  651. field3
  652. field3Title
  653. field4
  654. field4Slider
  655. field4Title
  656. field3Slider
  657. theN1N2View
  658. theComXMenu
  659. theComYMenu
  660. theComView
  661. changeFieldVals:
  662. theFuncView
  663. displayEnergyDiags:
  664. theEnDiagView
  665. n1InitField
  666. n2InitField
  667. wInitField
  668. timeEndField
  669. timeStartField
  670. scaleT0Field
  671. scaleT1Field
  672. scaleT2Field
  673. scaleRField
  674. scaleN1Field
  675. scaleN2Field
  676. scaleWField
  677. scaleTimeField
  678. actualT0Field
  679. actualT1Field
  680. actualT2Field
  681. actualRField
  682. actualN1Field
  683. actualN2Field
  684. actualWField
  685. actualTimeField
  686. clearDisplayAfterPassSW
  687. hideAllViewsSW
  688. loadEnSW
  689. loadNotesSW
  690. alertSuspectSW
  691. savePrefSW
  692. alertChoices
  693. setDefaultPrefs:
  694. resetTime:
  695. n1LowerField
  696. n1UpperField
  697. n2LowerField
  698. n2UpperField
  699. wLowerField
  700. wUpperField
  701. initParDefaults:
  702. timeDefaults:
  703. updateDataInfo:
  704. timeStepField
  705. timeStepSlider
  706. absTolField
  707. absTolSlider
  708. relTolField
  709. relTolSlider
  710. timeStepHasChanged:
  711. absTolHasChanged:
  712. relTolHasChanged:
  713. integrationDefaults:
  714. integrationChoices
  715. integrationMethodHasChanged:
  716. initValsForNewPassSW
  717. smartPrintPSCode:
  718.     resetAll:
  719. startStopModel:
  720. stopTimeHasChanged:
  721. startTimeHasChanged:
  722. maxNumIsChanging:
  723. showLaser:
  724. hideLaser:
  725. theLaser
  726. maxUpperNumText
  727. makeKeyAndOrderFront:
  728. performClick:
  729. photonField
  730. startButton
  731. legendText
  732. changeAnimationSpeed:
  733. setComViewLabels:
  734.